import { http } from "@/utils/http";
import httpConfig from "@/utils/http/httpConfig";
const prefix = httpConfig.pms;

/**
 * 获取 品牌列表
 * @param params
 */
export function CategoryList(params?: Record<string, any>) {
  return http.get(prefix + "/category/list", { params });
}

/**
 * 添加 品牌
 * @param params
 * @returns {*}
 */
export function CategoryAdd(params: Record<string, any>) {
  return http.post(prefix + "/category", { data: params });
}

/**
 * 修改 品牌
 * @param params
 * @returns {*}
 */
export function CategoryEdit(params: Record<string, any>) {
  return http.post(prefix + "/category/edit", { data: params });
}

/**
 * 删除 品牌
 * @param params
 * @returns {*}
 */
export function CategoryDelete(params: Record<string, any>) {
  return http.post(prefix + "/category/del", { data: params });
}

/**
 * 获取详情 品牌
 * @param params
 * @returns {*}
 */
export function CategoryDetail(params: any) {
  return http.get(prefix + "/category/" + params);
}

export function CategoryListTree(params: any) {
  return http.get(prefix + "/category/listWithTree", { params });
}
